This application is directed to electronic processing of visual images and, more particularly, to a method for automatically processing monochromatic electronic image data for identifying colors within the visual image.
Electronic imaging equipment, for example solid-state cameras, are rapidly being incorporated into automated industrial processes. An overview of the operation of such imaging systems and a description of the capability of such systems are given in U.S. patent application Ser. No. 363,664 filed Mar. 31, 1982 by Beall, Tomlinson and Hart and assigned to General Electric Company, now U.S. Pat. No. 4,493,105, the disclosure of that application being incorporated herein by reference. One of the drawbacks in these imaging systems is that the electronic image is monochromatic, i.e., the camera is only capable of detecting light intensity so that the electronic image is processed in shades of gray. For most industrial processes, e.g. fabrication, assembly, packaging and dimension measurement, the only requirement is for shape and edge determination so that monochromatic images are satisfactory. However, these are occasions when identification or classification by color is desired. Such an occasion for automated inspection might occur, for example, in the inspection of pharmaceutical products such as pills which are often identified solely by color.
One prior art system for identifying color uses the intensity of the light reflected from an object as an indication of color. Since it is well known that different colors reflect different intensities of light, color differentiation can be based upon the relative comparison of gray scale values. A viewer of a monochrome television, i.e., a black-and-white television, will recognize that a striped or plaid item of clothing will appear striped or plaid in shades of gray. If relative intensity values, i.e., gray scale values, are assigned to each color, one can recognize the individual colors by comparison with known gray scale values. For electronic comparison, the gray scale value for a particular color can be determined and stored as a digital numerical value. Subsequent observations of objects by the camera can then be processed to yield their gray scale value and these values compared to the reference values.
In the prior art system, the reference gray scale values are set up with threshold values. If the observed gray scale value exceeds one threshold value but is less than another, it is assumed to be the color corresponding to that associated with the given threshold. The problem with such a system is that it is sensitive to minor changes in ambient lighting. Although the human eye readily recognizes that ambient lighting has changed and can quickly adjust to gray scale changes, the electronic system depends entirely on absolute values and cannot readily compensate for lighting changes. In addition, small objects such as pills may have surface pitting variations which effect reflectively or may be canted such that shadows appear in the field of view. If average reflectivity is determined over the field of view, the shadows or pitting may change the observed gray scale values and result in erroneous color identification.
It is an object of the present invention to provide a method for identifying color of an object in a field of view of a monochrome camera.
It is a further object of the invention to provide a method for electronically processing gray scale values in order to identify by color a plurality of objects within the field of view of a monochrome camera.
It is a still further object to provide a method for classifying gray scale values obtained from an electronic monochrome camera in order to identify surface irregularities in an object within the camera field of view.